package com.lywz.biz.logic.scenic.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lywz.biz.common.dao.CommonDao;
import com.lywz.biz.common.entity.scenic.Scenic;
import com.lywz.biz.logic.scenic.ScenicLogic;

@Service("scenicLogic")
public class ScenicLogicImpl implements ScenicLogic {
//    @Autowired
//    private ScenicDao scenicDao;

    @Autowired
    private CommonDao commonDao;

    
    @Override
    public boolean deleteScenic(Integer scenicId) {
        
        try {
            // TODO Auto-generated method stub
            // 删除该景区的其他相关信息
            commonDao.delete(commonDao.queryById(Scenic.class, scenicId));            
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }

}
